<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.6.0.js" type="text/javascript"></script>
	</head>
	<body>
		<div>1</div>
		<div>2</div>
		<div>3</div>

		<ul>
			<li id="foo">foo</li>
			<li id="bar">bar</li>
			<li id="baz">baz</li>
		</ul>

		<script type="text/javascript">
			console.log($('#bar').index('li'));
			console.log($('#bar').index());
			
			//隐式遍历
			$('div').css("font-size", "20px");


			$('div').each(function(k, v) {
				// console.log(k, v);
			})

			let arr = ['zhangsan', 'lisi', 'wangwu'];
			$.each(arr, function(k, v) {
				// console.log(k, v);
			})
		</script>
	</body>
</html>
